<template>
  <div class="recommend">
    <div class="ban1">人气推荐</div>
    <div class="van-card" v-for="item in arr" :key="item.id">
      <div class="van-card__header">
        <a href="">
          <div class="van-image">
            <img :src="item.list_pic_url" alt="" />
          </div>
        </a>
      </div>
      <div class="van-card_right">
        <div class="title">
          <p>{{ item.name }}</p>
          <p>{{ item.goods_brief }}</p>
        </div>
        <div class="pri">
          {{ item.retail_price | RMBformat }}
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
export default {
  props: ["arr"],
};
</script>
<style lang = "less" scoped>
.recommend {
  margin-top: 10px;
  width: 100%;
  background-color: white;
  .ban1 {
    text-align: center;
    height: 50px;
    line-height: 50px;
    font-size: 20px;
  }
  .van-card {
    box-sizing: border-box;
    padding: 8px 16px;
    color: #323233;
    font-size: 12px;
    background-color: #fafafa;
    height: 104px;
    .van-card__header {
      margin-right: 10px;

      float: left;

      .van-image {
        img {
          width: 88px;
          height: 88px;
        }
      }
    }
    .van-card_right {
      .title {
        :nth-child(1) {
          max-height: 32px;
          font-weight: 500;
          line-height: 29px;
          font-size: 18px;
        }
        :nth-child(2) {
          height: 40px;
          max-height: 100px;
          line-height: 40px;
        }
      }
      .pri {
        line-height: 20px;
        color: #8d0000;
      }
    }
  }
}
</style>